package com.cn.stepLock.listener;

import com.cn.stepLock.chain.ChainHelper;
import com.cn.stepLock.chain.Task;
import com.cn.stepLock.event.BaseEvent;

/**
 * @author Aaron
 * @desc
 * @createTime 2022-02-24 5:44
 * @since
 */
public class FinishTaskListener extends BaseListener {

    public FinishTaskListener(ChainHelper chainHelper) {
        super(chainHelper);
    }

    public void handleEvent(BaseEvent eventObject){
        Task task = (Task)eventObject.getSource();
        chainHelper.executeTail(task);
    }
}
